// CQPoint.h: interface for the CQPoint class.
//
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////
//Copyright (c) 2007 Tencent
//Author : springsu
//Date : 2007-3-21 11:43:04
//Version : 
//Description : 
////////////////////////////////////////////////////////////////////////
#if !defined(AFX_QPOINT_H__1BAB9653_33CF_4886_9D19_0B932E377A26__INCLUDED_)
#define AFX_QPOINT_H__1BAB9653_33CF_4886_9D19_0B932E377A26__INCLUDED_
//////////////////////////////////////////////////////////////////////////
#include "cx_typedef.h"
#include "QBaseTypes.h"
#include "PlatformConfig.h"
//////////////////////////////////////////////////////////////////////////

class CQPoint : public tagQPOINT
{
public:
	IMPORT_C CQPoint();
	IMPORT_C CQPoint(QINT initX, QINT initY);
	IMPORT_C CQPoint(QPOINT & initPt);
	IMPORT_C CQPoint(QSIZE & initSize);
   
	// translate the QPOINT
	IMPORT_C QVOID Offset(QINT xOffset, QINT yOffset);
	IMPORT_C QVOID Offset(QPOINT b); 
	IMPORT_C QVOID Offset(QSIZE b);

    QINT GetX() const { return x; }
    QINT GetY() const { return y; }
	
	QVOID SetPoint(QINT nX, QINT nY) { x = nX; y = nY;}
	QVOID SetX(QINT nX) { x = nX; }
	QVOID SetY(QINT nY) { y = nY; }

	IMPORT_C QBOOL operator==(QPOINT b) const;
	IMPORT_C QBOOL operator!=(QPOINT b) const;
	IMPORT_C QVOID operator+=(QPOINT b);
	IMPORT_C QVOID operator-=(QPOINT b);

	IMPORT_C QVOID operator+=(QSIZE b);
	IMPORT_C QVOID operator-=(QSIZE b);
	
	// Operators returning CQPoint values
	IMPORT_C CQPoint operator-() const;
	IMPORT_C CQPoint operator+(QPOINT b) const;
	IMPORT_C CQPoint operator-(QPOINT b) const;
	IMPORT_C CQPoint operator+(QSIZE b) const;
	IMPORT_C CQPoint operator-(QSIZE b) const;
};

#endif // !defined(AFX_QPOINT_H__1BAB9653_33CF_4886_9D19_0B932E377A26__INCLUDED_)
